package com.microback.base.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.microback.base.model.SysAccount;
import com.microback.base.service.impl.AccountService;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private AccountService accountService;

    @GetMapping("/test.do")
    public IPage test(Integer currentPage, Integer pageSize){
        IPage page = accountService.queryAccountList(currentPage, pageSize);
        return page;
    }

}
